﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using System.Data;
using Model;

namespace BLL
{
    public class ArticlescrapBLL
    {
        ArticlescrapDAL dal = new ArticlescrapDAL();
        /// <summary>
        /// 带条件分页获取获取面试经验文章
        /// </summary>
        /// <returns></returns>
        public pageLibrary<Articlescrap> GetArticlescrap(int pageindex, int pagesize, int UserId)
        {
            pageLibrary<Articlescrap> pager = new pageLibrary<Articlescrap>();
            pager.PageIndex = pageindex;
            pager.PageSize = pagesize;
            pager.PageCount = dal.count(UserId);
            pager.Data = dal.GetArticlescrap(pageindex, pagesize, UserId);
            return pager;
        }

        /// <summary>
        /// 根据Id删除商家信息表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DelArticlescrap(int id)
        {
            return dal.DelArticlescrap(id);
        }
        /// <summary>
        /// 添加面试经验文章
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int addinfo(Articlescrap artic)
        {
            return dal.addinfo(artic);
        }


      /// <summary>
       /// 根据Id获取面试经验文章信息
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
      public List<Articlescrap> GetArtById(int id)
      {
          return dal.GetArtById(id);
      }
    }
}
